// 请求第三方接口 node为客户端

let http = require('http')

http.get('http://www.imooc.com/u/card',function (res) {  
  let data = ''
  res.on('data',function (chunk) {  
    data += chunk
  })
  res.on('end', function () {  
    let result = JSON.parse(data)
    console.log('result :', result.msg)
  })
})